//
//  WBDemoViewController.swift
//  新浪微博
//
//  Created by shanlin on 2017/8/11.
//  Copyright © 2017年 shanlin. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseViewController {

    override func viewDidLoad() {
        
        super.viewDidLoad()
        // ?? 0  因为前面navigationController?  是可选的
        self.title = "第\(navigationController?.childViewControllers.count ?? 0)"
    }
    @objc fileprivate func showNext(){
        let vc = WBDemoViewController()
        navigationController?.pushViewController(vc, animated: true)
        
    }
    
    
    
}

extension WBDemoViewController {
    override func setupTableView() {
        super.setupTableView()
        //
        navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", fontSize: 16, target: self, action: #selector(showNext))
    }
}
